package Fish.practice;

class Fish{
	int weight=1;
}
class Lake{
	Fish fish;
	void setFish(Fish s){
		fish = s;
	}
	void eat(int n){
		fish.weight = fish.weight + n;
	}
}
class FishandLake{
	public static void main(String[] args) {
		    Fish niqiu = new Fish();
		    Lake taihu =new Lake();
		    taihu.setFish(niqiu);
		    System.out.println(niqiu.weight);
		    taihu.setFish(niqiu);
		    taihu.eat(15);
		    System.out.println(niqiu.weight);
		    System.out.println(taihu.fish.weight);
	}
}